//
//  RequestUnit.m
//  SenMo
//
//  Created by ZengYuan on 15/12/31.
//  Copyright © 2015年 ZengYuan. All rights reserved.
//

#import "RequestUnit.h"

@implementation RequestUnit

-(void)encodeWithCoder:(NSCoder *)encoder
{
    [encoder encodeObject:self.requester_phoneno forKey:@"requester_phoneno"];
    [encoder encodeObject:self.device_id forKey:@"device_id"];
    [encoder encodeObject:self.create_time forKey:@"create_time"];
    [encoder encodeObject:self.deviceName forKey:@"deviceName"];
    [encoder encodeObject:self.requester_name forKey:@"requester_name"];

    [encoder encodeBool:self.hasAgree forKey:@"hasAgree"];

}

-(id)initWithCoder:(NSCoder *)decoder
{
    self.requester_phoneno = [decoder decodeObjectForKey:@"requester_phoneno"];
    self.device_id = [decoder decodeObjectForKey:@"device_id"];
    self.create_time = [decoder decodeObjectForKey:@"create_time"];
    self.deviceName = [decoder decodeObjectForKey:@"deviceName"];
    self.requester_name = [decoder decodeObjectForKey:@"requester_name"];

    self.hasAgree = [decoder decodeBoolForKey:@"hasAgree"];
    return self;
}

@end
